package com.android.qjpmc.kernel;

import com.android.qjpmc.data_module.AnalogDataItem;
import com.android.qjpmc.data_module.DataLocation;
import com.android.qjpmc.data_module.DigitalDataItem;

import java.util.List;

/**
 * Created by tree on 2016/8/29.
 */
public class PwrDiagramObject
{
    public int m_ScreenHeight=0;
    public int m_ScreenWidth=0;
    public int m_PageNum=0;

    public List<Page> m_Page = null;


    public static class Page
    {
        public int m_PageID = 0;
        public int m_PageType = 0;
        public String m_PageName = "接线图";
        public String m_BackColor = "0,0,0";

        public int m_LineNum = 0;
        public int m_RectNum = 0;
        public int m_ArcNum = 0;
        public int m_CircleNum = 0;
        public int m_TextNum = 0;
        public int m_PictureNum = 0;

        public List<Line> m_Line = null;
        public List<Arc> m_Arc = null;
        public List<Rect> m_Rect = null;
        public List<Picture> m_Picture = null;
        public List<Text> m_Text = null;
        public List<Circle> m_Circle = null;

        public int m_ElementNum = 0;
        public int m_StateComptNum = 0;
        public int m_ValueComptNum = 0;
        public int m_NormalBtnNum = 0;
        public int m_InvisibleBtnNum = 0;

        public List<Element> m_Element = null;
        public List<StateCompt> m_StateComptList = null;
        public List<ValueCompt> m_ValueCompt = null;
        public List<NormalBtn> m_NormalBtn = null;
        public List<InvisibleBtn> m_InvisibleBtn = null;

        //数据位置
        public DataLocation[] m_DigitalValues = null;//数字量位置
        public DataLocation[] m_AnaloglValues = null;//模拟量位置
    }

    public static class Element {
        public String m_StartPoint = "0,0";
        public String m_EndPoint = "100,100";
        public String m_ElementName = "元件";

        public int m_LineNum = 0;
        public int m_RectNum = 0;
        public int m_ArcNum = 0;
        public int m_CircleNum = 0;
        public int m_TextNum = 0;
        public int m_PictureNum = 0;

        public List<Line> m_Line = null;
        public List<Arc> m_Arc = null;
        public List<Rect> m_Rect = null;
        public List<Picture> m_Picture = null;
        public List<Text> m_Text = null;
        public List<Circle> m_Circle = null;
    }



    public static class ValueCompt {
        public String m_StartPoint = "0,0";
        public String m_EndPoint = "100,100";
        public String m_Unit = "";

        public int m_DecimalPlace = 2;
        public int m_FontSize = 2;
        public String m_TextColor = "0,0,0";
        public String m_BackColor = "0,0,0";

        public int m_StationID = 0;
        public int m_GroupIdx = 0;
        public int m_DataIdx = 0;

        public int m_AlignType = 1;

        public float m_DefaultValue = 0;

        private AnalogDataItem m_AnalogData = null;
        private DigitalDataItem m_DigitalData = null;

        public DataEntrance m_DataEntrance = null;
        ValueCompt()
        {
            m_DataEntrance = new DataEntrance();
        }

        public void SetAnalogDataItem(AnalogDataItem item)
        {
            m_AnalogData = item;
        }

        public void SetDigitalDataItem(DigitalDataItem item)
        {
            m_DigitalData = item;
        }
        public DataLocation GetDataLocation()
        {
            DataLocation m_data_location = new DataLocation();
            m_data_location.m_StationID = m_StationID;
            m_data_location.m_DataTeamIndex = m_GroupIdx;
            m_data_location.m_DataIndex = m_DataIdx;
            return m_data_location;
        }

    }

    public static class NormalBtn {
        public String m_StartPoint="0,0";
        public String m_EndPoint="100,100";
        public int m_FuncType = 2;

        public String  m_BtnConText = "";

        public int m_FontSize=2;
        public String m_TextColor = "0,0,0";
        public String m_BackColor = "0,0,0";

        public int m_StationID = 0;
        public int m_GroupIdx = 0;
        public int m_DataIdx = 0;
    }

    public static class InvisibleBtn
    {
        public String m_StartPoint = "0,0";
        public String m_EndPoint = "100,100";
        public int m_FuncType = 2;

        public int m_StationID = 0;
        public int m_GroupIdx = 0;
        public int m_DataIdx = 0;
    }

    public static class Line
    {
        public String m_StartPoint = "0,0";
        public String m_EndPoint = "100,100";
        public int m_LineWidth = 2;
        public String m_LineColor = "文本";
    }

    public static class Rect{
        public String m_StartPoint="0,0";
        public String m_EndPoint="100,100";
        public int m_LineWidth=2;
        public String m_LineColor="0,0,0";
        public byte m_FillSign=1;
        public String m_FillColor="0,0,0";
    }

    public static class Circle{
        public String m_StartPoint="0,0";
        public String m_EndPoint="100,100";
        public int m_LineWidth=2;
        public String m_LineColor="0,0,0";
        public byte m_FillSign=1;
        public String m_FillColor="0,0,0";
    }

    public static class Text{
        public String m_StartPoint="0,0";
        public String m_EndPoint="100,100";
        public int m_Length=64;
        public String m_Context="文本";
        public int m_FontSize=2;
        public String m_TextColor="0,0,0";
        public String m_BackColor="0,0,0";
        public int m_AlignType=1;
    }

    public static class Arc{
        public String m_StartPoint="0,0";
        public String m_EndPoint="100,100";
        public int m_LineWidth=2;
        public String m_LineColor="0,0,0";
        public int m_StartAngle=0;
        public int m_EndAngle=0;
    }

    public static class Picture{
        public String m_StartPoint="0,0";
        public String m_EndPoint="100,100";
        public String m_PicLink="";
        public String m_BackColor="0,0,0";
        public byte m_TransparentSign=0;
    }


}
